package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.Menu;
import com.itheima.pojo.Role;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RoleDao {
    public Set<Role> findByUserId(Integer userId);
    public Page<Role> findPage(String queryString);
    public List<Role> findAll();
    void deleteByRoleId(Integer roleId);
    void add(Role role);
    void setPermissionRole(Map<String, Integer> map);
    void setMenuRole(Map<String, Integer> map);
    List<Menu> findAllMenu();
    Role findById(Integer id);
    List<Integer> findCheckMenuIdsByRoleId(Integer id);
    List<Integer> findCheckPermissionIdsByRoleId(Integer id);
    void edit(Role role);
    void deleteAssocicationWithMenuByRoleId(Integer id);
    void deleteAssocicationWithPermissionByRoleId(Integer id);
    void deleteAssocicationWithUserByRoleId(Integer roleId);
    List<Role> findAllZP();
}
